package basic.Callback;


public class UpperServiceImpl implements UpperService {

    private BottomService bottomService;

    @Override

    public void upperTaskAfterCallBottomService(String upperParam) {

        System.out.println( upperParam + " upperTaskAfterCallBottomService() execute.");

    }

    public UpperServiceImpl(BottomService bottomService) {

        this.bottomService = bottomService;

    }

    @Override

    public void callBottomService(final String param) {

//        toDo
// 这里需要用线程池管理
        new Thread(new Runnable() {

            @Override
            public void run() {

                bottomService.bottom(UpperServiceImpl.this,    param  + " callBottomService.bottom() execute --> ");

            }

        }).start();

    }

}